package com.zsp.config;

import lombok.Getter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取项目相关配置
 */
@Component
@ConfigurationProperties(prefix = "myconfig")
public class MyConfig
{

    /** 上传路径 */
    @Getter
    private static String profile;


    public void setProfile(String profile)
    {
        MyConfig.profile = profile;
    }


    /**
     * 获取上传路径
     */
    public static String getUploadPath()
    {
        return getProfile() + "/upload";
    }
}
